{% extends "base_portadmin.html" %}

{% block object-tools %}
	<ul class="object-tools">
		<li><a href="/portadmin/csts/">List of CST</a></li>
	</ul>
{% endblock %}

{% block mainheading %}
	Delete {{ cst }}
{% endblock %}

{% block content %}
	<form action="/portadmin/csts/{{ cst.pk }}/delete/" method="POST">
	{% csrf_token %}
	Do you want to delete <b>{{ cst }}</b>?!<br /><br />
	Parameter <b>{{ cst.market_direction_1 }}</b>:<br />
	<ul>
	{% for p in csts_for_market_1 %}
		<li>{{ p }}</li>
	{% empty %}
		<li style="color: red">linked to this CST only!</li>
	{% endfor %}
	</ul>
	{% if cst.market_direction_2  %}
		Parameter <b>{{ cst.market_direction_2 }}</b>:<br />
		<ul>
		{% for p in csts_for_market_2 %}
			<li>{{ p }}</li>
		{% empty %}
			<li style="color: red">linked to this CST only!</li>
		{% endfor %}
		</ul>
	{% endif %}
	
	{% if allow_delete %}
		<input type="submit" class="button" value="Delete!" />
	{% else %}
		<p style="color: red">Could not delete CST! Fix Parameter dependencies first, please!</p>
		<input type="button" class="button" value="Back to list of CST" onclick="document.location.href='/portadmin/csts/'" />
	{% endif %}
	</form>
{% endblock %}
